package ce.dozer;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.dozer.DozerBeanMapper;

public class DozerTest {

	@SuppressWarnings("unchecked")
	public static void main(String[] args) {
		DozerBeanMapper mapper = new DozerBeanMapper();
		List myMappingFiles = new ArrayList();
		myMappingFiles.add("dozerBeanMapping.xml");
		mapper.setMappingFiles(myMappingFiles);

		User u = new User();
		Info info = new Info();
		info.setCreateDate(new Date());
		info.setGender(GenderType.male);
		u.setInfo(info);
		u.setId(1);
		u.setName("testName");
		UserVO uvo = (UserVO) mapper.map(u, UserVO.class);
		System.out.println(uvo.getInfo().getDate());
		System.out.println(uvo.getInfo().getGender());
	}
}
